projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65caf5b
)
Byte code arity check micro-optimisation
author
Mattias Engdegård
<mattiase@acm.org>
Fri, 31 Dec 2021 18:44:02 +0000
(19:44 +0100)
committer
Mattias Engdegård
<mattiase@acm.org>
Mon, 24 Jan 2022 10:41:46 +0000
(11:41 +0100)
* src/bytecode.c (exec_byte_code): Slight simplification.
src/bytecode.c
patch
|
blob
|
history
diff --git
a/src/bytecode.c
b/src/bytecode.c
index 0d0a28cd0bbdf808e31543e05a59e4e0f1a940c1..00db29b0140cbc9186b1f784530322e7c8d44652 100644
(file)
--- a/
src/bytecode.c
+++ b/
src/bytecode.c
@@
-391,8
+391,7
@@
exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
bool rest = (at & 128) != 0;
int mandatory = at & 127;
ptrdiff_t nonrest = at >> 8;
- ptrdiff_t maxargs = rest ? PTRDIFF_MAX : nonrest;
- if (! (mandatory <= nargs && nargs <= maxargs))
+ if (! (mandatory <= nargs && (rest || nargs <= nonrest)))
Fsignal (Qwrong_number_of_arguments,
list2 (Fcons (make_fixnum (mandatory), make_fixnum (nonrest)),
make_fixnum (nargs)));